-
Notifications
You must be signed in to change notification settings - Fork 747
fix(amazonq): validate customization on profile change #7049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
ew |
| .then(async (customizations) => { | ||
| const r = customizations.find((it) => it.arn === selectedCustomization.arn) | ||
| if (!r) { | ||
| await switchToBaseCustomizationAndNotify() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switchToBaseCustomizationAndNotify() is not slow (no network calls), so it's ok for it to be await'd, right?
If you want it to be async also, then would be:
switchToBaseCustomizationAndNotify().catch(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha, thanks for explanation :)
## Problem followup of #7049 as mentioned in #7049 ``` Before we introduced QProfile customization is bound to a specific idc instance After customization is bound to a specific Q profile and an idc instance can have multi profiles in other words, each Q profile will have access to different sets of customization ``` ## Solution Product team wants us to show all customizations across profiles instead of the connected one only. By that mean, when users select a customization, it might implicitly change the profile for users in the selected customization is not accessible by the current profile. The purpose is to reduce the churn users might be lost what profile has access to what customization. ## user story 1. click "select customization" button from the menu -> should show "all" customizations across profiles 2. select a customization under different profile -> should change the profile to the one owning the newly selected customization 3. select a profile which doesn't have access to the selected customization -> should fallback to "default" and prompt ui saying you don't have access to the customization ### Implicity change profile when user selects a customization under a different profile https://github.com/user-attachments/assets/49bfe61f-04a7-4d07-aaff-1e3c284fb710 ### Change profile should validate if the selected customization is under the new profile or not https://github.com/user-attachments/assets/414f85dd-50a1-4d28-9b33-e59691f25a0c Note that customization will have only 1 profile owner, so there wont be duplicate customization across profiles --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
Problem
Before
customization is bound to a specific idc instance
After
customization is bound to a specific Q profile and an idc instance can have multi profiles
therefore each Q profile will have access to different sets of customization
Solution
We need to validate if the selected customization is accessible from the user's selected profile, otherwise will get
feature/xbranches will not be squash-merged at release time.